package test;

import com.mysql.jdbc.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */




/**
 *
 * @author bartek
 */
public class Polaczenie {
    
    
            public static Connection getConnection() throws SQLException
            {


        String drivers = "com.mysql.Driver";
        if (drivers != null) {
            System.setProperty("jdbc.drivers", drivers);
        }
        String url = "jdbc:mysql://83.143.103.153/corejava";
        String username = "root";
        String password = "wasior1";

        return (Connection) DriverManager.getConnection(url, username, password);
    }

}

